﻿using MediatR;
using System.WXT.Domain;
using System.WXT.Infrstructre.Interface;
using System.WXT.WebAPI.Application.Command.CraftCommand;

namespace System.WXT.WebAPI.Application.CommandHandlers.CraftCommandHandlers
{
    public class CraftBackFillCommandHandlers:IRequestHandler<CraftBackFillCommand,Craft>
    {
        protected readonly ICraftRepository craftRepository;

        public CraftBackFillCommandHandlers(ICraftRepository craftRepository)
        {
            this.craftRepository = craftRepository;
        }
        /// <summary>
        /// 工艺反填
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<Craft> Handle(CraftBackFillCommand request, CancellationToken cancellationToken)
        {
            var list = await craftRepository.GetBaby(request.craftManageId);
            return list;
        }
    }
}
